<!--
 * @Author: Dee Dee
 * @Date: 2021-08-10 11:37:22
 * @LastEditors: Dee Dee
 * @LastEditTime: 2023-09-27 10:43:07
 * @FilePath: /培训认证系统20230809/src/views/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="app-container home">
        <Transition name="fade-transform" mode="out-in">
            <component :is="cur_role.id==2?'Person':'Admin'" />
        </Transition>
    </div>
</template>

<script>
import Admin from "@/views/vadmin/home/admin";
import Person from "@/views/vadmin/home/person";
import { mapGetters, mapState } from "vuex";

export default {
    name: "index",
    data() {
        return {
            componentId: 'Person'

        }
    },
    components: {
        Person,
        Admin
    },
    computed: {
        ...mapState(["settings", "admin", "id","cur_role"]),
        variables() {
            return variables;
        },
        theme() {
            return this.$store.state.settings.theme;
        },
        admin() {
            return this.$store.state.user.admin;
        },
        cur_role() {
            return this.$store.state.user.cur_role;
        },
        id() {
            return this.$store.state.user.id;
        }
    },
    data() {
        return {}
    },
    methods: {

    },
};
</script>



